import request from '@/utils/request'

// 创建答题错题
export function createAnswerError(data) {
  return request({
    url: '/exam/answer-error/create',
    method: 'post',
    data: data
  })
}

// 更新答题错题
export function updateAnswerError(data) {
  return request({
    url: '/exam/answer-error/update',
    method: 'put',
    data: data
  })
}

// 删除答题错题
export function deleteAnswerError(id) {
  return request({
    url: '/exam/answer-error/delete?id=' + id,
    method: 'delete'
  })
}

// 获得答题错题
export function getAnswerError(id) {
  return request({
    url: '/exam/answer-error/get?id=' + id,
    method: 'get'
  })
}

// 获得答题错题分页
export function getAnswerErrorPage(query) {
  return request({
    url: '/exam/answer-error/page',
    method: 'get',
    params: query
  })
}

// 导出答题错题 Excel
export function exportAnswerErrorExcel(query) {
  return request({
    url: '/exam/answer-error/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
